/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2025-08-19
 * Time: 9:54
 */
public class demo1 {
    public static void main(String[] args) throws InterruptedException {
        Object object = new Object();
        System.out.println("wati 之前");
        synchronized(object){
            object.wait();

        }
        System.out.println("wait 之后");

        Thread t = new Thread(() -> {
            synchronized (object){
                object.notify();

            }
        });

        t.start();
    }
}
